package com.suguowen.sblog.service;

import com.suguowen.sblog.bean.User;
import com.suguowen.sblog.bean.UserExample;
import com.suguowen.sblog.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Autowired
    UserMapper userMapper;

    public User findByName(String name){
        return userMapper.selectOneByName(name);
    }

    public void register(User iuser) {
        userMapper.insertUser(iuser);
    }
}
